/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package startupsolutions.mobilize;

import javax.jdo.PersistenceManager;

/**
 *
 * @author ultimoistante
 */
class UserDAO
	{
	public static UserBean login(UserBean userBean)
		{
		PersistenceManager pm = PMF.get().getPersistenceManager();
		// retrieves existing object
		UserBean checkBean = pm.getObjectById(UserBean.class, userBean.getUsername());
		//
		userBean.setValid(checkBean != null);
		//
		return userBean;
		}
	}
